The present application relates to a detecting device, a detecting method, a program, and an electronic apparatus, and particularly, to a detecting device, a detecting method, a program, and an electronic apparatus appropriately used to detect, for example, a shape of a human hand on an image.
There is a skin detecting technique that detects a region (hereinafter, referred to as a skin region) where a skin such as a face or a hand is exposed on an image obtained by capturing an image of a person (for example, refer to Electric Engineering C (proposal of skin detecting method using near infrared multi-bandwidth) written by Suzuki Yasuhiro, Japan, 2007, Vol. 127, No. 4).
In this skin detecting technique, a first image capturing an image of a subject (a person) irradiated with light of a wavelength λ1 output from an LED (a light emitting diode) and a second image capturing the image of the subject irradiated with light of a wavelength λ2 different from the wavelength λ1 output from an LED, are obtained. Then, a region where a difference between pixel values (luminance values or 256 grayscale luminance values of pixels) of the first and second images is larger than a predetermined threshold value is detected as a skin region.
Furthermore, the wavelengths λ1 and λ2 are determined according to the reflectance characteristics of human skin. That is, the reflectances of the light of the wavelengths λ1 and λ2 irradiated to the human skin are different from each other, and the reflectances of the light of the wavelengths λ1 and λ2 irradiated to a portion other than the human skin (for example, clothes and the like) are almost the same. Specifically, for example, the wavelength λ1 is set to 870 nm, and the wavelength λ2 is set to 950 nm.